package com.woniu.HisHospitalizationApi;

import com.woniu.dto.HisRoomDto;
import com.woniu.dto.PageDTO;
import com.woniu.param.HisRoomAddParam;
import com.woniu.param.HisRoomParam;
import com.woniu.param.PageParam;
import com.woniu.util.Result;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

import java.util.ArrayList;
import java.util.List;

@FeignClient(
        value = "his-hospitalization",
        contextId = "HisRoom"
)
@Api(tags = "住院病房接口")
public interface HisRoomApi {
    //-------------------关于病房操作-------------------
    //新增病房
    @ApiOperation("新增病房")
//    @ApiImplicitParams({
//            @ApiImplicitParam(name = "hisRoomAddParam",
//                    value = "病房对象",
//                    required = false,
//                    dataType = "hisRoomAddParam",
//                    paramType = "由住院聚合服务调用传入" )
//    })
    @PostMapping("addHisRoom")
    public Result<HisRoomDto> addHisRoom(@RequestBody HisRoomAddParam hisRoomAddParam);

    //删除病房根据id或num
    @ApiOperation("删除病房")
//    @ApiImplicitParams({
//            @ApiImplicitParam(name = "id",
//                    value = "病房id",
//                    required = false,
//                    dataType = "arraylist",
//                    paramType = "由住院聚合服务调用传入" )
//    })
    @DeleteMapping("deleteHisRoomById")
    public Result<Boolean> deleteHisRoomById(@RequestParam("id") ArrayList<Integer> id);

    //修改病房
    @ApiOperation("修改病房")
//    @ApiImplicitParams({
//            @ApiImplicitParam(name = "hisRoomParam",
//                    value = "病房对象",
//                    required = false,
//                    dataType = "hisRoomParam",
//                    paramType = "由住院聚合服务调用传入" )
//    })
    @PutMapping("updateHisRoom")
    public Result<HisRoomDto> updateHisRoom(@RequestBody HisRoomParam hisRoomParam);

    //查询病房
    @ApiOperation("查询病房")
//    @ApiImplicitParams({
//            @ApiImplicitParam(name = "id",
//                    value = "id",
//                    required = false,
//                    dataType = "arraylist")
//    })
    @PostMapping("getHisRoomBy")
    public Result<PageDTO<HisRoomDto>> getHisRoomById(@RequestBody HisRoomParam hisRoomParam);

    @ApiOperation("查询所有病房")
    @PostMapping("getAllRoom")
    public Result<PageDTO<HisRoomDto>> getAllRoom(@RequestBody PageParam pageParam);
}
